<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>红岩文化导航栏</title>
    <script src="./js/vue.global.js"></script>
<style>
    /* 全局样式 */
a{
    color: #999;
    text-decoration: none;
} 
ul, ol, li {
    list-style: none;
}

/* 一级导航样式 */
nav{
    width: 100%;
    background-color:#ed1d24;
    height: 100px;
    border-bottom: 8px solid #ed1d24;
}
#nav_ul{
    width: 1020px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}
#nav_li{
    width: 113px;
    height: 100px;
    text-align: center;
    position: relative;
}
#nav_li:hover a{
    background-image: url(./images/nav.png);
} 
#nav_li>a{
    width: 113px;
    height: 70px;
    display: block;
    padding: 30px 0px 0px;
}
#nav_li>a>p{
    color: #ffffff;
    font-size: 20px;
    font-family: "微软雅黑";
    font-weight: 600;
    margin: 0px;
}
#nav_li>a>span{
    display: block;
    width: 113px;
    height: 16px;
    color: #ffffff;
    font-size: 12px;
    font-family: "微软雅黑";
    margin: 0px;
}

/* 二级导航样式 */
#li_ul{
    position: absolute;
    background-color: #ed1d24;
    padding: 0px;
    display: none;
}
#li_li{
    width: 113px;
    text-align: center;
}
#li_li>a>p{
    color: #ffffff;
    font-size: 14px;
    font-family: "微软雅黑";
    height: 30px;
    line-height: 30px;
}
#li_li>a>p:hover{
    background-color: rgb(155, 32, 38);
}
#nav_li:hover #li_ul{
    display: block;
}
</style>
</head>

<body>

    <!-- 199010127 吴金昔 -->


    <!-- 导航栏 -->
    <nav>
        <!-- 一级导航 -->
        <ul id="nav_ul">
            <!-- 将nvaList中的数据遍历到一级导航中 -->
            <li v-for="list in navList" id="nav_li">
                <a :href="list.url">
                    <p>{{list.name}}</p>
                    <span>{{list.name_en}}</span>
                </a>
                <!-- 二级导航 -->
                <ul id="li_ul">
                    <!-- 将li_children中的数据遍历到二级导航中 -->
                    <li v-for="li_child in list.li_children" id="li_li" >
                        <a :href="li_child.link">
                            <p>{{li_child.name}}</p>
                        </a>
                    </li>
                </ul>
            </li>
        </ul>
    </nav>

<script>
    Vue.createApp({
        data(){
            return{
                // 定义一级导航内部模块数据：name、name_en、url、li_children;
                navList:[
                    {
                        name:'首页',
                        name_en:'Home',
                        url:'https://www.hongyan.info/',
                        // 定义二级导航内部模块数据：name、link
                        li_children:[
                        ]
                    },
                    {
                        name:'关于红岩',
                        name_en:'HongYan',
                        url:'https://www.hongyan.info/',
                        li_children:[
                            {
                                name:'红颜历史',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'博物馆机构',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'历史沿革',
                                link:'https://www.baidu.com'
                            }
                        ]
                    },
                    {
                        name:'公告动态',
                        name_en:'Dynamics',
                        url:'https://www.hongyan.info/',
                        li_children:[
                            {
                                name:'文博信息',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'政务平台',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'公告',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'专题报道',
                                link:'https://www.baidu.com'
                            }
                        ]
                    },
                    {
                        name:'馆藏精品',
                        name_en:'Collections',
                        url:'https://www.hongyan.info/',
                        li_children:[
                            {
                                name:'一级文物',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'二级文物',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'三级文物',
                                link:'https://www.baidu.com'
                            }
                        ]
                    },
                    {
                        name:'陈列展览',
                        name_en:'Exhibition',
                        url:'https://www.hongyan.info/',
                        li_children:[
                            {
                                name:'虚拟展览',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'基本陈列',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'复原陈列',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'临时展览',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'展览交流',
                                link:'https://www.baidu.com'
                            }
                        ]
                    },
                    {
                        name:'研究开发',
                        name_en:'Research',
                        url:'https://www.hongyan.info/',
                        li_children:[
                            {
                                name:'历史研究',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'艺术创作',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'影音在线',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'文创产品',
                                link:'https://www.baidu.com'
                            }
                        ]
                    },
                    {
                        name:'公共教育',
                        name_en:'Education',
                        url:'https://www.hongyan.info/',
                        li_children:[
                            {
                                name:'党性教育',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'爱国主义教育',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'研学实践教育',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'科普教育',
                                link:'https://www.baidu.com'
                            }
                        ]
                    },
                    {
                        name:'参观服务',
                        name_en:'Service',
                        url:'https://www.hongyan.info/',
                        li_children:[
                            {
                                name:'景点介绍',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'服务内容',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'网上预约',
                                link:'https://www.baidu.com'
                            },
                            {
                                name:'支援服务',
                                link:'https://www.baidu.com'
                            }
                        ]
                    },
                    {
                        name:'网上预约',
                        name_en:'Reservation',
                        url:'https://www.hongyan.info/',
                        li_children:[
                        ]
                    },
                ]                
            }
        }
    }).mount('#nav_ul')    
    
</script>
</body>
</html>